package com.ygqh.baby.po;

import java.math.BigDecimal;
import java.util.Date;

import com.ygqh.baby.utils.DateConvertUtils;

public class YgUserCultivationDay {
	private Long id;

	private Long userId;

	private Long orderId;

	private BigDecimal orderPrice;

	private BigDecimal returnPrice;

	private BigDecimal totalPrice;

	private Date day;

	private String status;

	private Date updateTime;

	private String updateBy;

	private String remark;

	private String userName;

	@Override
	public boolean equals(Object obj) {
		if (obj instanceof YgUserCultivationDay) {
			YgUserCultivationDay day1 = (YgUserCultivationDay) obj;
			if (userId.equals(day1.getUserId()) && getDayStr().equals(day1.getDayStr()) && orderId.equals(day1.getOrderId())) {
				return true;
			}
		}
		return false;
	}

	public String getUserName() {
		return userName;
	}

	public void setUserName(String userName) {
		this.userName = userName;
	}

	public Long getOrderId() {
		return orderId;
	}

	public void setOrderId(Long orderId) {
		this.orderId = orderId;
	}

	public String getStatus() {
		return status;
	}

	public void setStatus(String status) {
		this.status = status;
	}

	public Date getUpdateTime() {
		return updateTime;
	}

	public void setUpdateTime(Date updateTime) {
		this.updateTime = updateTime;
	}

	public String getUpdateBy() {
		return updateBy;
	}

	public void setUpdateBy(String updateBy) {
		this.updateBy = updateBy;
	}

	public String getRemark() {
		return remark;
	}

	public void setRemark(String remark) {
		this.remark = remark;
	}

	public String getDayStr() {
		return DateConvertUtils.format(day);
	}

	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public Long getUserId() {
		return userId;
	}

	public void setUserId(Long userId) {
		this.userId = userId;
	}

	public BigDecimal getOrderPrice() {
		return orderPrice;
	}

	public void setOrderPrice(BigDecimal orderPrice) {
		this.orderPrice = orderPrice;
	}

	public BigDecimal getReturnPrice() {
		return returnPrice;
	}

	public void setReturnPrice(BigDecimal returnPrice) {
		this.returnPrice = returnPrice;
	}

	public BigDecimal getTotalPrice() {
		return orderPrice.subtract(returnPrice);
	}

	public void setTotalPrice(BigDecimal totalPrice) {
		this.totalPrice = totalPrice;
	}

	public Date getDay() {
		return day;
	}

	public void setDay(Date day) {
		this.day = day;
	}

	@Override
	public String toString() {
		return "YgUserCultivationDay [id=" + id + ", userId=" + userId + ", orderPrice=" + orderPrice + ", returnPrice=" + returnPrice + ", totalPrice="
				+ totalPrice + ", day=" + day + "]";
	}

}